import request from '@/utils/request'

export function getGoodsUnitList (params:any) {
    return request({
        url: 'store.goodsUnit/list',
        method: 'GET',
        params
    })
}

export function getGoodsUnitSelect () {
    return request({
        url: 'store.goodsUnit/select',
        method: 'GET'
    })
}

export function createGoodsUnit (data:any) {
    return request({
        url: 'store.goodsUnit/create',
        method: 'POST',
        data
    })
}
export function updateGoodsUnit (data:any) {
    return request({
        url: `store.goodsUnit/update`,
        method: 'PUT',
        data
    })
}
export function delGoodsUnit (data:{id:number|string}) {
    return request({
        url: `store.goodsUnit/delete`,
        method: 'DELETE',
        data
    })
}

export function getGoodsUnitDetail (params:{id:number|string}) {
    return request({
        url: `store.goodsUnit/detail`,
        method: 'GET',
        params
    })
}